// const LoginServices = {
//
//     login:async(username,password)=>{
//         console.log('LoginServices')
//
//         return {'ddd':111};
//     }
// }
//
// module.exports = LoginServices

const UserModel = require("../models/userModel");

class LoginServices{
    /**
     *
     * @param username
     * @param password
     * @returns {Promise<*>}
     */
    async login(username, password) {

        try {
            const user =  await UserModel.findOne({ where: { uid:1 } });
            return user;
        } catch (error) {
            throw new Error(`数据库查询失败:${error.message}`);
        }
    }
}

module.exports = new LoginServices();
